package javaCode.chapter07.Homework.homework04;

public class Manager extends  Employee{

    //特有属性
    private double bonus; //奖金

    //重写打印方法
    @Override
    public void printSal() {
        //因为经理工资计算方式和Employee 不一样，所以重新写
        System.out.println("经理 " + super.getName() + " 工资=" + (bonus + getDaySal() * getWorkDays() *getGrade()));
    }

    //创建Manager对象时，奖金是多少不确定，在构造器中不给 bonus，可以通过setBonus
    public Manager(String name, int daySal, int workDays, double grade) {
        super(name, daySal, workDays, grade);
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}
